package MyObjectList;

import MyIterator.MyIterator;

import java.util.ArrayList;
import java.util.List;

public abstract class AbstractItemList {
    protected List items = new ArrayList();

    public AbstractItemList(List items) {
        this.items.addAll(items);
    }

    public void addItem(Object item) {
        this.items.add(item);
    }

    public void removeItem(Object item) {
        this.items.remove(item);
    }

    public List getItems() {
        return items;
    }

    public abstract MyIterator createIterator();
}
